v0.3.2: CI 一致性守护改为可选设施#3
Merged
Merged
Conversation
- 新增 lingshu ci install:从内置模板拷贝 .github/workflows/rules-consistency.yml 幂等(已存在跳过);--force 覆盖 - init 默认不再拷贝 .github/(copyTemplate 加 exclude 参数) - init 完成提示加 lingshu ci install 一行 - doctor 扩为 4 步:[4/4] 可选设施检查(不装 CI 也不算错误) - 模板 README 目录树 .github/workflows/ 移出常规树、脚注为"可选设施" - CLI 仓 README 加 lingshu ci install 段 - smoke 22 → 25:init 断言 .github/ 从"应存在"改为"禁止存在"(零侵入契约) + 3 用例(ci install 生成 / 幂等+--force / 非灵枢项目报错)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
主题
Optional CI —— `.github/workflows/` 从默认拷贝改为按需加装。
背景
用户反馈:不是所有派生仓都用 GitHub Actions(GitLab CI / Jenkins / self-hosted / 或干脆不用 CI)。之前 `init` 默认拷贝 `.github/workflows/rules-consistency.yml` 到派生仓,对上述场景形成隐性侵入——即便文件已技术中立,"未经我同意就配好 CI" 本身就是一种侵入。
延续 v0.3.1 减法哲学:init 只装干净的骨架,功能设施按需加装。
Added
Changed
Migration
存量派生仓完全不受影响——已装的 workflow 保留,`upgrade` 不主动删。
新 init 项目默认无 CI;如需守护:`lingshu ci install`。
Test plan